import java.io.*;
import java.util.Arrays;

class UseFile {
    public static void main(String [] args) {
        //String file = "/Users/azmohan/code/java/io/stream/myFile.txt";
        String file = "./../stream";
        File f = new File(file);
        System.out.println("The file is exists ? " + f.exists());
        System.out.println("The file can read? " + f.canRead());
        System.out.println("The file can write? " +f.canWrite());
        System.out.println("The file is file? " + f.isFile());
        System.out.println("The file is directory? " + f.isDirectory());
        System.out.println("The file absolute path? " + f.getAbsolutePath());
        System.out.println("The file path? " + f.getPath());
        System.out.println("The file is absolute path? " + f.isAbsolute());
        System.out.println("The file's name is " + f.getName());
        System.out.println("The file's parent path is " + f.getParent());
        System.out.println("The file's last modified time is " + f.lastModified());
        System.out.println("The file's length is " + f.length());
        System.out.println("The file's list " + Arrays.asList(f.list()).toString());

    }
}
